//
//  UIButton+extensions.swift
//  SINAWeiBo
//
//  Created by wangwei on 2016/11/13.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

//给button写一个分类

extension UIButton {

    convenience init(title: String,imageName: String,textColor: UIColor) {
            self.init()
        self.setBackgroundImage(UIImage(named: imageName), for: UIControlState.normal)
          self.setBackgroundImage(UIImage(named: imageName), for: UIControlState.highlighted)
        
        self.setTitle(title, for: UIControlState.normal)
        self.setTitleColor(textColor, for: UIControlState.normal)
    
    
    }

}
